/*
 * @Author: ZephyrGao
 * @Date: 2024-02-08 15:23:28
 * @Description: 组件注册
 * Copyright (c) 2024 by ZephyrGao, All Rights Reserved. 
 */

import { App } from 'vue'


// 注册全局组件 components
import FastSvgIcon from '@/components/fast-vue3/icon/index.vue'
import FastScroll from '@/components/fast-vue3/scroll/index.vue'

// antd plugin
import Antd from 'ant-design-vue';
import * as Icons from '@ant-design/icons-vue'
// element plus plugin
import ElementPlus from 'element-plus'

// components
const fastComponents :any = {FastSvgIcon,FastScroll}
// plugins 这块按需引入可以
const fastPlugins :any = {Antd,ElementPlus}

 

export default {
  install(app: App<Element>) {
    Object.keys(fastComponents).forEach(key => {
      app.component(key, fastComponents[key])
    })
    Object.keys(fastPlugins).forEach(key => {
      app.use(fastPlugins[key])
    })
    // 全局注册所有图标  
    // Object.keys(Icons).forEach(key => {  
    //   app.component(key, Icons[key])  
    // }) 
  },
}

